﻿<UserControl x:Class="Dotway.WPF.Samples.DotwaySampleApplication.WaveEffectSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:effects="clr-namespace:Dotway.WPF.Effects;assembly=Dotway.WPF.Effects">
    <Grid Margin="20">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        
        <TextBlock Grid.Row="0" HorizontalAlignment="Center" Text="This is a pixel shader Sine-wave effect that will also map the interaction to the right position. Try and click the button!" TextWrapping="Wrap" />
        
        <StackPanel Grid.Row="1" Width="300" Margin="10">
            <Border Background="Gray" BorderBrush="Black" BorderThickness="2" Height="200" >
                <StackPanel TextElement.FontSize="30">
                    <TextBlock Foreground="White" Text="{Binding}"/>
                    <Button Height="70" Content="This is a Button" Click="ButtonClick" />
                </StackPanel>
                <Border.Effect>
                    <effects:WaveEffect x:Name="waveEffect"/>
                </Border.Effect>
            </Border>
            <TextBlock Text="Frequency:" Margin="0,10,0,0"/>
            <Slider Value="{Binding ElementName=waveEffect, Path=Frequency}" Maximum="100"/>
            <TextBlock Text="Amplitude:" Margin="0,10,0,0"/>
            <Slider Value="{Binding ElementName=waveEffect, Path=Amplitude}" SmallChange="0.01" Maximum="1.5"/>
            <TextBlock x:Name="output" Foreground="Red"/>
        </StackPanel>
    </Grid>
</UserControl>
